package jsyf.oa.service.crm;

import com.alibaba.dubbo.common.utils.StringUtils;
import com.alibaba.fastjson.JSON;
import jsyf.oa.dao.crm.ExhibitionAimsDao;
import jsyf.oa.entity.crm.ExhibitionAimsEntity;
import jsyf.oa.facade.crm.ExhibitionAimsFacade;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.alibaba.fastjson.JSONObject;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by WHH-PC on 2017/12/26.
 */
@Service
@Transactional(rollbackFor = Exception.class)
@com.alibaba.dubbo.config.annotation.Service(protocol = {"dubbo"})
public class ExhibitionAimsService implements ExhibitionAimsFacade{
    @Autowired
    private ExhibitionAimsDao exhibitionAimsDao;

    @Override
    public String save(String jsonData) {
        ExhibitionAimsEntity entity = JSON.toJavaObject(JSON.parseObject(jsonData), ExhibitionAimsEntity.class);
        exhibitionAimsDao.add(entity);
        return entity.getId();
    }

}
